﻿using System;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
using EpiNEXT.Core.Collections;

namespace EpiNEXT.Core.Fields
{
    [Serializable()]
    public class FieldsDTO
    {
        [XmlArray("LabelFields")]
        [XmlArrayItem("LabelField", typeof(LabelField))]
        public ObservableCollection<LabelField> LabelFields { get; set; }

        [XmlArray("TextBoxFields")]
        [XmlArrayItem("TextBoxField", typeof(TextBoxField))]
        public ObservableCollection<TextBoxField> TextBoxFields { get; set; }

        [XmlArray("FixedCellTextBoxFields")]
        [XmlArrayItem("FixedCellTextBoxField", typeof(FixedCellTextBoxField))]
        public ObservableCollection<FixedCellTextBoxField> FixedCellTextBoxFields { get; set; }

        [XmlArray("DatePickerFields")]
        [XmlArrayItem("DatePickerField", typeof(DatePickerField))]
        public ObservableCollection<DatePickerField> DatePickerFields { get; set; }

        [XmlArray("DateBoxFields")]
        [XmlArrayItem("DateBoxField", typeof(DateBoxField))]
        public ObservableCollection<DateBoxField> DateBoxFields { get; set; }

        [XmlArray("NumberFields")]
        [XmlArrayItem("NumberField", typeof(NumberField))]
        public ObservableCollection<NumberField> NumberFields { get; set; }

        [XmlArray("MirrorFields")]
        [XmlArrayItem("MirrorField", typeof(MirrorField))]
        public ObservableCollection<MirrorField> MirrorFields { get; set; }

        [XmlArray("YesNoFields")]
        [XmlArrayItem("YesNoField", typeof(YesNoField))]
        public ObservableCollection<YesNoField> YesNoFields { get; set; }

        [XmlArray("CheckBoxFields")]
        [XmlArrayItem("CheckBoxField", typeof(CheckBoxField))]
        public ObservableCollection<CheckBoxField> CheckBoxFields { get; set; }

        [XmlArray("ComboBoxFields")]
        [XmlArrayItem("ComboBoxField", typeof(ComboBoxField))]
        public ObservableCollection<ComboBoxField> ComboBoxFields { get; set; }

        [XmlArray("ListBoxFields")]
        [XmlArrayItem("ListBoxField", typeof(ListBoxField))]
        public ObservableCollection<ListBoxField> ListBoxFields { get; set; }

        [XmlArray("RectangleFields")]
        [XmlArrayItem("RectangleField", typeof(RectangleField))]
        public ObservableCollection<RectangleField> RectangleFields { get; set; }

        [XmlArray("StaticImageFields")]
        [XmlArrayItem("StaticImageField", typeof(StaticImageField))]
        public ObservableCollection<StaticImageField> StaticImageFields { get; set; }

        [XmlArray("DataGridFields")]
        [XmlArrayItem("DataGridField", typeof(DataGridField))]
        public ObservableCollection<DataGridField> DataGridFields { get; set; }

        [XmlArray("RelateButtonFields")]
        [XmlArrayItem("RelateButtonField", typeof(RelateButtonField))]
        public ObservableCollection<RelateButtonField> RelateButtonFields { get; set; }

        [XmlArray("CommandButtonFields")]
        [XmlArrayItem("CommandButtonField", typeof(CommandButtonField))]
        public ObservableCollection<CommandButtonField> CommandButtonFields { get; set; }

        [XmlArray("RadioButtonListFields")]
        [XmlArrayItem("RadioButtonListField", typeof(RadioButtonListField))]
        public ObservableCollection<RadioButtonListField> RadioButtonListFields { get; set; }

        [XmlArray("CheckBoxListFields")]
        [XmlArrayItem("CheckBoxListField", typeof(CheckBoxListField))]
        public ObservableCollection<CheckBoxListField> CheckBoxListFields { get; set; }

        [XmlArray("ImageFields")]
        [XmlArrayItem("ImageField", typeof(ImageField))]
        public ObservableCollection<ImageField> ImageFields { get; set; }

        [XmlArray("GroupFields")]
        [XmlArrayItem("GroupField", typeof(GroupField))]
        public ObservableCollection<GroupField> GroupFields { get; set; }

        public FieldsDTO()
        {
            LabelFields = new ObservableCollection<LabelField>();
            TextBoxFields = new ObservableCollection<TextBoxField>();
            FixedCellTextBoxFields = new ObservableCollection<FixedCellTextBoxField>();
            DatePickerFields = new ObservableCollection<DatePickerField>();
            DateBoxFields = new ObservableCollection<DateBoxField>();
            NumberFields = new ObservableCollection<NumberField>();
            MirrorFields = new ObservableCollection<MirrorField>();
            YesNoFields = new ObservableCollection<YesNoField>();
            CheckBoxFields = new ObservableCollection<CheckBoxField>();
            ComboBoxFields = new ObservableCollection<ComboBoxField>();
            ListBoxFields = new ObservableCollection<ListBoxField>();
            RectangleFields = new ObservableCollection<RectangleField>();
            StaticImageFields = new ObservableCollection<StaticImageField>();
            DataGridFields = new ObservableCollection<DataGridField>();
            RelateButtonFields = new ObservableCollection<RelateButtonField>();
            CommandButtonFields = new ObservableCollection<CommandButtonField>();
            RadioButtonListFields = new ObservableCollection<RadioButtonListField>();
            CheckBoxListFields = new ObservableCollection<CheckBoxListField>();
            ImageFields = new ObservableCollection<ImageField>();
            GroupFields = new ObservableCollection<GroupField>();
        }
    }
}
